﻿using System.ComponentModel;
using InfiniTec;

namespace CalendarSubscriptionApp
{
	public sealed class SelectCasServerViewModel: INotifyPropertyChanged
	{
		private string _Hostname;

		public string Hostname
		{
			get { return _Hostname; }
			set
			{
				if (value == _Hostname) return;
				_Hostname = value;
				PropertyChanged.Raise(this, "Hostname");
			}
		}

		public bool ShowDialog()
		{
			var window = new SelectCasServerDialog(this);
			return window.ShowDialog().GetValueOrDefault();
		}

		public event PropertyChangedEventHandler PropertyChanged;
	}
}
